<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  

  
  <title>静态blog-hexo搭建学习 | Hexo</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="1.安装Node.js：https:&#x2F;&#x2F;nodejs.org&#x2F;en&#x2F; 2.W7：点击屏幕左下开始，输入cmd，打开DOS界面 3.查看node.js版本，v=version：于DOS界面输入命令：node -v       4.安装Hexo框架输入安装命令：$ npm install -g hexo-cli耐心等待安装结束，查看版本：hexo -v 5.安装cnpm：$ npm install -">
<meta property="og:type" content="article">
<meta property="og:title" content="静态blog-hexo搭建学习">
<meta property="og:url" content="http:&#x2F;&#x2F;yoursite.com&#x2F;2019&#x2F;11&#x2F;25&#x2F;blog%E6%90%AD%E5%BB%BA%E5%AD%A6%E4%B9%A0&#x2F;index.html">
<meta property="og:site_name" content="Hexo">
<meta property="og:description" content="1.安装Node.js：https:&#x2F;&#x2F;nodejs.org&#x2F;en&#x2F; 2.W7：点击屏幕左下开始，输入cmd，打开DOS界面 3.查看node.js版本，v=version：于DOS界面输入命令：node -v       4.安装Hexo框架输入安装命令：$ npm install -g hexo-cli耐心等待安装结束，查看版本：hexo -v 5.安装cnpm：$ npm install -">
<meta property="og:locale" content="en">
<meta property="og:updated_time" content="2019-11-25T14:12:02.000Z">
<meta name="twitter:card" content="summary">
  
    <link rel="alternate" href="/atom.xml" title="Hexo" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link rel="stylesheet" href="/css/style.css">
</head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">Hexo</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="Search"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://yoursite.com"></form>
      </div>
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main"><article id="post-blog搭建学习" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2019/11/25/blog%E6%90%AD%E5%BB%BA%E5%AD%A6%E4%B9%A0/" class="article-date">
  <time datetime="2019-11-25T11:22:39.000Z" itemprop="datePublished">2019-11-25</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      静态blog-hexo搭建学习
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>1.安装Node.js：<a href="https://nodejs.org/en/" target="_blank" rel="noopener">https://nodejs.org/en/</a></p>
<p>2.W7：点击屏幕左下开始，输入cmd，打开DOS界面</p>
<p>3.查看node.js版本，v=version：<br>于DOS界面输入命令：node -v      </p>
<p>4.安装Hexo框架<br>输入安装命令：<br>$ npm install -g hexo-cli<br>耐心等待安装结束，查看版本：hexo -v</p>
<p>5.安装cnpm：<br>$ npm install -g cnpm –registry=<a href="https://registry.npm.taobao.org" target="_blank" rel="noopener">https://registry.npm.taobao.org</a><br>查看cnpm版本：cnpm -v</p>
<hr>
<p>本地使用<br>1.hexo init<br>2.hexo new “BlogName”<br>3.hexo generate<br>4.hexo s   (s=server  ,  <a href="http://localhost:4000" target="_blank" rel="noopener">http://localhost:4000</a>)   </p>
<p>服务器部署<br>1.在github创建新仓库：YourGithubName.github.io<br>2.在Hexo目录下打开git bash here，并输入以下安装Hexo的git部署插件命令：<br>$ npm install hexo-deployer-git –save<br>3.在Hexo目录下打开_config.yaml文件，做如下修改：</p>
<h1 id="Deployment"><a href="#Deployment" class="headerlink" title="Deployment"></a>Deployment</h1><h2 id="Docs-https-hexo-io-docs-deployment-html"><a href="#Docs-https-hexo-io-docs-deployment-html" class="headerlink" title="Docs: https://hexo.io/docs/deployment.html"></a>Docs: <a href="https://hexo.io/docs/deployment.html" target="_blank" rel="noopener">https://hexo.io/docs/deployment.html</a></h2><p>deploy:<br>  type: git<br>  repo: <a href="https://github.com/yuttts/yuttts.github.io.git" target="_blank" rel="noopener">https://github.com/yuttts/yuttts.github.io.git</a><br>  branch: master<br>  4.部署，输入命令：<br>$ hexo d<br> 5.部署成功后，输入YourGithubName.github.io，即可访问。</p>
<p>———————————————–2019.11.25更新</p>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2019/11/25/blog%E6%90%AD%E5%BB%BA%E5%AD%A6%E4%B9%A0/" data-id="ck4gvw12f0007egr185jmepdb" class="article-share-link">Share</a>
      
      
    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2019/11/26/1%20java%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%861/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          java基础知识1
        
      </div>
    </a>
  
  
    <a href="/2019/11/25/hello-world/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">Hello World</div>
    </a>
  
</nav>

  
</article>

</section>
        
          <aside id="sidebar">
  
    

  
    

  
    
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/12/">December 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/11/">November 2019</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Recent Posts</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2019/12/22/7-%E6%9E%84%E9%80%A0%E6%96%B9%E6%B3%95%E4%B8%8E%E5%8F%82%E6%95%B0%E4%BC%A0%E9%80%92/">7-构造方法与参数传递</a>
          </li>
        
          <li>
            <a href="/2019/12/19/6%20java%E5%9F%BA%E7%A1%80-%E7%B1%BB%E4%B8%8E%E5%AF%B9%E8%B1%A1/">java基础-类与对象</a>
          </li>
        
          <li>
            <a href="/2019/12/10/5%20java%E5%9F%BA%E7%A1%80-%E6%96%B9%E6%B3%95/">java基础-方法</a>
          </li>
        
          <li>
            <a href="/2019/12/06/4%20%E6%8E%A7%E5%88%B6%E8%AF%AD%E5%8F%A52-%E5%BE%AA%E7%8E%AF%E7%BB%93%E6%9E%84/">控制语句2-循环结构</a>
          </li>
        
          <li>
            <a href="/2019/11/30/3%20java-%E6%8E%A7%E5%88%B6%E8%AF%AD%E5%8F%A51/">java-控制语句1</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2019 John Doe<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>
    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>


  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
  <script src="/fancybox/jquery.fancybox.pack.js"></script>


<script src="/js/script.js"></script>



  </div>
</body>
</html>